package com.lwj.framework.entity;

import java.util.HashMap;
import java.util.Map;

import com.lwj.framework.security.AuthUtils;

public class AuthEntity {
	private String name;
	private String clientId;
	private String secret;
	private String[] grantTypes;
	private String[] authorities;
	private String[] scopes;
	private Integer accessTokenValiditySeconds;
	private Integer refreshTokenValiditySeconds;
	/** 扩展信息 */
	private Map<String, Object> extension = new HashMap<>();
	private Boolean tokenStore;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getClientId() {
		return clientId;
	}

	public void setClientId(String clientId) {
		this.clientId = clientId;
	}

	public String getSecret() {
		return secret;
	}

	public void setSecret(String secret) {
		this.secret = secret;
	}

	public String[] getGrantTypes() {
		return grantTypes;
	}

	public void setGrantTypes(String[] grantTypes) {
		this.grantTypes = grantTypes;
	}

	public String[] getAuthorities() {
		return authorities;
	}

	public void setAuthorities(String[] authorities) {
		this.authorities = authorities;
	}

	public String[] getScopes() {
		return scopes;
	}

	public void setScopes(String[] scopes) {
		this.scopes = scopes;
	}

	public Integer getAccessTokenValiditySeconds() {
		return accessTokenValiditySeconds;
	}

	public void setAccessTokenValiditySeconds(Integer accessTokenValiditySeconds) {
		this.accessTokenValiditySeconds = accessTokenValiditySeconds;
	}

	public Integer getRefreshTokenValiditySeconds() {
		return refreshTokenValiditySeconds;
	}

	public void setRefreshTokenValiditySeconds(Integer refreshTokenValiditySeconds) {
		this.refreshTokenValiditySeconds = refreshTokenValiditySeconds;
	}

	public Boolean getTokenStore() {
		return tokenStore;
	}

	public void setTokenStore(Boolean tokenStore) {
		this.tokenStore = tokenStore;
		extension.put(AuthUtils.TOKEN_STORE, tokenStore);
	}

	public Map<String, Object> getExtension() {
		return extension;
	}

	public void setExtension(Map<String, Object> extension) {
		this.extension = extension;
	}

}
